<template>
	<view class="city">
		<change-header></change-header>
		<change-list :cityList="cityList" :alpahel="alpahel"></change-list>
		<change-alphabal :cityAlphabal="cityList" @changeAlpal="changeAlpal"></change-alphabal>
	</view>
</template>

<script>
	import changeHeader from '../../componment/changeHeader.vue'
	import changeList from '../../componment/changeList.vue'
	import changeAlphabal from '../../componment/changeAlphabal.vue'
	export default {
		components:{
			changeHeader,
			changeList,
			changeAlphabal
		},
		data() {
			return {
				cityList:[],
				alpahel:''
			}
		},
		methods: {
			changeAlpal(res){
				this.alpahel=res
			},
			getcityList(){
				uni.request({
					url:'api//htdocs/myapi/city.json',
					success:(res)=>{
						this.cityList=res.data.city
						console.log(this.cityList)
						// console.log(res)
					}
				})
			}
		},
		created(){
			this.getcityList()
		}
	}
</script>

<style>
.city{
	width: 100%;
	height: 100%;
	background: #000000;
}
</style>
